package com.example.blog.mapper;

import com.example.blog.model.BlogInfo;
import com.example.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserInfoMapper {
    @Select("select id,user_name,password,github_url from `user_info` where delete_flag=0 and user_name=#{username} order by id desc")
    UserInfo selectByName(String username);

    @Select("select id,user_name,github_url from `user_info` where delete_flag=0 and id=#{id}")
    UserInfo selectById(int id);
}
